Use Latin1 when converting from Garmin device.
authorGöran Uddeborg <goeran@uddeborg.se>
Sun, 1 Oct 2017 16:20:45 +0000 (18:20 +0200)
committerGöran Uddeborg <goeran@uddeborg.se>
Sun, 1 Oct 2017 16:20:45 +0000 (18:20 +0200)
Clean up duplicate call to simplified on the waypoint description
string.

garmin.cc

index 87cf51f76002ee471f2c40f55399c65a4f964ffe..8639d775d8621666ba278cafcab5d11106b0a952 100644 (file)
--- a/garmin.cc
+++ b/garmin.cc
@@ -394,8 +394,8 @@ waypt_read(void)
   for (i = 0; i < n; i++) {
     Waypoint* wpt_tmp = new Waypoint;
 
-    wpt_tmp->shortname = way[i]->ident;
-    wpt_tmp->description = QString(way[i]->cmnt).simplified();
+    wpt_tmp->shortname = QString::fromLatin1(way[i]->ident);
+    wpt_tmp->description = QString::fromLatin1(way[i]->cmnt);
     wpt_tmp->shortname = wpt_tmp->shortname.simplified();
     wpt_tmp->description = wpt_tmp->description.simplified();
     wpt_tmp->longitude = way[i]->lon;